<!-- <div class="row">
  <h1 translate lib="web">packages</h1>
</div> -->
<div class="row">
  <div class="col-md-6">
  </div>
  <div class=" col-md-6 text-right">
    <em class="fas fa-cog fa-spin" ng-show="ctrl.loading==true" title="Hang on, loading data"></em>
    <a class="btn" href ng-click="ctrl.loadData()" title="Reload current data">
      <span translate lib="web">reload</span>
    </a>
    <a href="#/Agents" class="btn btn-info" translate lib="web">agents</a>
    <a href="#/Package" class="btn btn-info" translate lib="web">uploadpackage</a>
    <a href="https://marketplace.visualstudio.com/items?itemName=openiap.openiap-assistant" class="btn btn-info" translate lib="web">publishpackage</a>    
  </div>
</div>
<div ng-show="ctrl.errormessage != ''" class=" alert alert-danger" role="alert">{{ctrl.errormessage}}</div>
<table id="table1" class="table table-striped table-hover table-sm" when-scrolled="ctrl.more()" style="width: 100%;">
  <thead class="thead-dark">
    <tr>
      <th scope="col" ng-click="ctrl.ToggleOrder('name')"><strong translate lib="web">name</strong></th>
      <th scope="col" ng-click="ctrl.ToggleOrder('image')"><strong translate lib="web">language</strong></th>
      <th scope="col" ng-click="ctrl.ToggleOrder('_createdby')"><strong translate lib="web">createdby</strong></th>
      <th class="text-right"></th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="model in ctrl.models">
      <td><a ng-href="#/Package/{{model._id}}">{{model.name}}</a></td>
      <td>{{model.language}}</td>
      <td>{{model._createdby}}</td>
      <td class="text-right">
        <!-- <button ng-click="ctrl.StartAgent(model)" class="btn"  ng-disabled="ctrl.loading==true || (model.status == 'running' || model.status == 'Running') || model.status == '...'"><em
          class="fas fa-play"></em></button> -->
        <a ng-href="#/Package/{{model._id}}" class="btn"><em class="fas fa-edit"></em></a>
        <a class="btn" href ng-click="ctrl.DeletePackage(model)" ng-disabled="ctrl.loading==true"><em
          class="fas fa-trash"></em></a>
      </td>
    </tr>
  </tbody>
</table>